import { App } from 'vue'

import * as icons from '@element-plus/icons-vue'

const formatIcons: any = icons
const iconsPlugin = {
  install: function (app: App) {
    Object.keys(icons).forEach((key: string) => {
      app.component(key, formatIcons[key])
    })
  },
}
export const useIcons = (app: App) => {
  app.use(iconsPlugin)
}
